<?php
    
    $uaT = Engine_Api::_()->getDbTable('useranswers','exam');
    $a = $uaT->getUserAnswer($this->test->test_id,$this->user_id);
    
    $question = $this->Question();
    $question->setExam($this->test->getExam());
    $question->setViewStaticAnswer(true);
    $question->setViewCorrectAnswer(true);
    $question->setUserAnswerQuestion($a);
    
    
    
?>
<div class="exam_test_preview">
    <div class="exam_test_preview_image">
        <?php echo $this->itemPhoto($this->test->getExam()) ?>
    </div>
    <div class="exam_test_preview_detai">
        <div class="title">
            <?php echo $this->string()->truncate($this->test->getExam()->getTitle(),50) ?>
        </div>
        <div class="description">
            <?php echo $this->string()->truncate($this->test->getExam()->description) ?>
        </div>
        <div class="detail">
            <span>
                <?php echo $this->test->total_score ?>
            </span>
            <span>
                <?php echo $this->test->getExam()->total_question ?>
            </span>
        </div
    </div>
</div>
<div style="clear: both;">
    <?php 
        echo $question->render();
    ?>
    <form  action="<?php echo $this->url(array('action'=>'review','exam_id'=>$this->test->getExam()->exam_id,'format'=>'smoothbox'),'exam_test',true) ?>"> 
    
     <div style="clear:both;">
        <button type="submit">Back</button> 
     </div>
     
     </form>
</div>